All Questions
116 questions
0votes
2answers
83views
How to disable a textbox while when we hit edit option in edit.cshtml page in mvc?
====> Here is my edit.cshtml page code: <div class="form-group"> @Html.LabelFor(model => model.Eno, htmlAttributes: new { @class = "control-label col-md-2&...
-1votes
1answer
36views
How to create dropdown in MVC using model class and need to display the values(numbers) instead of names?
I tried much applications, but no useful. Can any one help me with this case. For example in dropdown list I have fruits list apple, banana, grape etc .. If I selected apple in dropdown, then I want ...
1vote
1answer
684views
ASP.Net MVC Dropdownlist List selected item values not displaying in the same View
I am trying to display a dropdown list in my View and I am able to generate the list items in the dropdown list and once an item is selected, I am trying to gather the details of the selected item and ...
0votes
1answer
4kviews
How to pass any selected option value from a view to a controller ASP.NET Core
This is my code. I want to select a option and pass the value in controller. <div class="form-group"> <label asp-for="MobileNumber&...
0votes
0answers
374views
How to get current user Id and user claim in any Class without pass by controller asp.net core
I'm creating a dynamic menu for all user dependence on user claims. I have three types of user claims Admin, Employee, and Manager. Now I need to get user policy in a class. So how can I get it? ...
0votes
1answer
255views
How can I populate a DropDown with the contents of an Array in .Net MVC?
This is probably super obvious, but I'm incredibly new at MVC (and C# in general) and I just can't figure it out. I have a viewModel that holds several bits of data about a project, which is then ...
1vote
0answers
406views
FluentValidation Validating Sums of Fields
I have a number of fields I need to validate together. I need to check the sum of A+B+C = the sum of D+E. If the sum of these two groups is not equal, I need to highlight all 5 fields. I can't seem to ...
0votes
1answer
1kviews
Does not contain a public instance or extension definition for 'getenumerator'
I am fetching data from WEB API. Be at the time of display is shows me error. public class PricingTooltemPrice { // Other Propery public List<CoinDateList> CoinDateList { get; set; } } ...
0votes
1answer
37views
I am trying to use the search through sql proc and every time I get an error for not completing the code and I don’t know what to do
iam try to get data using sql proc and I try to execute the code, but every time the code is not created, and I don’t know the reason this is my classes public class CLS_ShowModels { ...
0votes
4answers
364views
Getting 404 for HttpPost Action
I have a table of records being displayed in a partial view and some of them have no ID values. So I am trying to use an alternative field as an ID when clicking the Edit link for a particular record. ...
1vote
1answer
412views
Calling a Partial View
I've got a View rendering two dropdownlists. The controllers for the dropdownlists work fine. They call methods in a repository class for the DB selections. Below the dropdownlists I'm trying to ...
0votes
1answer
50views
Posting Back DropDownList from Strongly Typed View
This is related to an earlier question on binding a dropdownlist from a database. The dropdownlist is being bound and populated but is throwing an "Object reference not set to an instance of an ...
0votes
1answer
87views
Binding DropDownList from Database
I'm building a view which will display tabular data based on selections from two dropdownlists, the first which selects departments is populated from the database. The second is a static dropdownlist ...
0votes
1answer
59views
request.files returns null when using onsubmit attribute
Request.files returns null after adding onsubmit attribute to the BeginForm and working fine when removed . I tried with id attribute same issue. also i tried to add from collection in the controller ...
0votes
3answers
266views
Security Trimmed Menu as Partial View
I'm rendering a menu in my _Layout.cshtml file. One section of the menu should only render if the user is in the admin role. We are using custom roles in our DB. The Admin field comes back as a single ...